Rz=6.4e6
Ro=19.1e6
t=0:1000:24*3600;
n=length(t);
Vc=2*pi*(Rz+Ro)/(12*3600);
f0=1602e6;
c=3e8;
for i=1:n
    Xc(i)=(Rz+Ro)*cos((t(i)/(24*3600))*4*pi);
    Yc(i)=(Rz+Ro)*sin((t(i)/(24*3600))*4*pi);
    
        
    Vx(i)=-Vc*sin((t(i)/(24*3600))*4*pi);
    Vy(i)=Vc*cos((t(i)/(24*3600))*4*pi);
    
    Rvx(i)=Xc(i);
    Rvy(i)=Yc(i)-Rz;
    Vv(i)=-(Rvx(i)*Vx(i)+Rvy(i)*Vy(i))/sqrt(Rvx(i)*Rvx(i)+Rvy(i)*Rvy(i));
    fd(i)=f0*Vv(i)/c
    if Yc(i)>Rz 
        viden(i)=fd(i);
    else
        viden(i)=nan;
    end;
end;

plot(t, fd, 'b--', t, viden, 'b');  
